package com.hua.nailcampus.acl.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hua.nailcampus.acl.model.Messages;
import com.hua.nailcampus.acl.model.vo.MessagesVo;
import org.apache.ibatis.annotations.Mapper;

import java.util.Date;
import java.util.List;

/**
 * @Author:chenjianhua
 * @Date:2023/11/15 19:52
 * @Version 1.8
 */
@Mapper
public interface MessagesMapper extends BaseMapper<Messages> {
    /**
     *  根据关键字查询消息列表
     * @param userId
     * @param fId
     * @param keyWord
     * @return
     */
    List<Messages> selectListByKeyWord(Integer userId, Integer fId, String keyWord);

    /**
     * 根据时间查询消息列表
     * @param userId
     * @param fId
     * @param starDate
     * @param endDate
     * @return
     */
    List<Messages> selectMessageByDate(Integer userId, Integer fId, String starDate, String endDate);

    List<Messages> selectMessageBySenderIdAndDate(Integer fromUserID, Integer toUserID, String starDate, String endDate);
}
